#tag Module
Protected Module testGame
	#tag Method, Flags = &h1
		Protected Sub Run()
		  #if DebugBuild
		    'TestSetup
		    ''TestPlayer
		    'TestTownScore
		    'TestMonasteryScore
		    'TestStreetScore
		    'TestOccupyStreet
		    
		    'TestRandomAI
		    'dim runs as integer = 100
		    '
		    '
		    'for i as integer = 1 to runs
		    ''RandomVsDecission
		    ''DecissionVsDecission
		    'DecissionVs2Random
		    'Beep
		    'next
		    '
		    'dim m as new MessageDialog
		    '
		    'm.Title = "Total Wins after " + str(runs) + " games"
		    'm.Message = "Random AI: " + str(app.randomAI) + EndOfLine + "Decission AI: " + str(app.decissionAI) + EndOfLine + "Ties: " + str(app.tie)
		    'm.Explanation = "Highest Score Random: " + str(app.highestR) + EndOfLine + "Highest Score Decission: " + str(app.highestD)
		    'm.ActionButton.Caption = "Ok"
		    '
		    'call m.ShowModalWithin (testRunner)
		    
		  #endif
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub TestSetup()
		  #if DebugBuild
		    
		    //tileMaker.generate
		    dim dbgmsg as string
		    
		    
		    dim theGame as ConcreteGame
		    theGame = ConcreteGame.GetNewGameInstance
		    
		    dim pd as PlayerData
		    
		    pd.name = "Test1"
		    pd.type = 1
		    
		    theGame.AddPlayer(pd)
		    
		    pd.name = "Test2"
		    pd.type = 1
		    
		    theGame.AddPlayer(pd)
		    
		    pd.name = "Test3"
		    pd.type = 1
		    
		    theGame.AddPlayer(pd)
		    
		    pd.name = "Test4"
		    pd.type = 1
		    
		    theGame.AddPlayer(pd)
		    
		    pd.name = "Test5"
		    pd.type = 1
		    
		    theGame.AddPlayer(pd)
		    
		    'pd.name = "forbidden"
		    'pd.type = 1
		    '
		    'theGame.AddPlayer(pd)
		    theGame.TestGo
		    
		    
		    //checking the correct setup of the players
		    dbgmsg = "TestSetup :: Checking the added Players names "
		    
		    if theGame.GetPlayerById(0).GetName = "Test1" and _
		      theGame.GetPlayerById(1).GetName = "Test2" and _
		      theGame.GetPlayerById(2).GetName = "Test3" and _
		      theGame.GetPlayerById(3).GetName = "Test4" and _
		      theGame.GetPlayerById(4).GetName = "Test5" then
		      dbgmsg = dbgmsg + " passed"
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    //checking the colorsetup of the players
		    
		    dbgmsg = "TestSetup :: Checking the added Players colors "
		    
		    if theGame.GetPlayerById(0).GetColor = PlayerColors.Red and _
		      theGame.GetPlayerById(1).GetColor = PlayerColors.Green and _
		      theGame.GetPlayerById(2).GetColor = PlayerColors.Yellow and _
		      theGame.GetPlayerById(3).GetColor = PlayerColors.Blue and _
		      theGame.GetPlayerById(4).GetColor = PlayerColors.Black then
		      dbgmsg = dbgmsg + " passed"
		      unitTests.Testpassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    //checking playerswitching
		    
		    
		    dim t as string = "Test"
		    dim i as integer = 0
		    dim j as integer = 0
		    dim pass as boolean = true
		    
		    dbgmsg = "TestSetup :: Checking correct changing of players: "
		    
		    dim p as Player
		    
		    
		    for i = 0 to 12
		      'if theGame.GetCurrentPlayer.GetName <> t + str(j+1) then
		      p = theGame.GetCurrentPlayer
		      dbgmsg = dbgmsg + p.GetName + "/"
		      if p.GetName <> t + str(j+1) then
		        pass = false
		        exit for
		      end if
		      if j = 4 then
		        j = 0
		      else
		        j = j +1
		      end if
		      'theGame.nextPlayer
		      p.SwitchTo 3
		      p.EndRound
		    next i
		    
		    if pass = true then
		      dbgmsg = dbgmsg + "passed"
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed"
		      unitTests.Testfailed dbgmsg
		    end if
		    
		  #endif
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub TestPlayer()
		  #if DebugBuild
		    
		    dim dbgmsg as string
		    dim theGame as ConcreteGame
		    dim d as Dictionary
		    dim i as integer
		    dim slots() as Variant
		    dim keys() as variant
		    dim theSlot as board.Slot
		    
		    theGame = ConcreteGame.GetNewGameInstance
		    
		    unitTests.classes = unitTests.classes + 1
		    
		    dim pd as PlayerData
		    
		    pd.name = "Test1"
		    pd.type = 1
		    
		    theGame.AddPlayer(pd)
		    
		    theGame.TestGo
		    
		    dim theTile as Tile
		    dim theCoords() as Coordinates
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    theCoords  = thegame.GetPossibleCoordinatesForTile
		    
		    while Ubound(theCoords) = -1
		      theGame.GetCurrentPlayer.RotateClockwise
		      theCoords  = thegame.GetPossibleCoordinatesForTile
		    wend
		    
		    if theGame.GetCurrentPlayer.AddTileAtPosition(theTile, theCoords.Pop) = true then
		      dbgmsg = "Tile added successful"
		      unitTests.TestPassed dbgmsg
		      
		      'theGame.GetCurrentPlayer.NextPhase
		      
		      dbgmsg = "Switching to next actionstate 'OccupyActionState' "
		      if thegame.GetCurrentPlayer.GetActionState.ToString = "OccupyActionState" then
		        dbgmsg = dbgmsg + "successful"
		        unitTests.TestPassed dbgmsg
		        
		        d = theTile.GetAllSlots
		        slots = d.Values
		        keys = d.Keys
		        
		        for i = 0 to ubound (slots)
		          if slots(i).ObjectValue IsA board.Slot then
		            theSlot = board.Slot(slots(i))
		            
		            if theSlot.active = true and theSlot.occupieable = true and theSlot.gettype = "Street" or _
		              theSlot.getType = "Grassland" or theSlot.getType = "Town" then
		              theGame.GetCurrentPlayer.Occupy(keys(i).StringValue)
		              exit for
		            end if
		          end if
		          
		          '//theSlot = slots(i).ObjectValue
		          'if theSlot.active = true and theSlot.occupieable = true then
		          '//something
		          'end if
		        next i
		        
		        dim theName as string = theTile.GetOwner.GetName
		        
		        if len(theName) > 0 and theName = "Test1" then
		          dbgmsg  = "Slot occupation successful"
		          unitTests.TestPassed dbgmsg
		          
		          'theGame.GetCurrentPlayer.EndRound
		          'theGame.GetCurrentPlayer.NextPhase
		          
		          dbgmsg = "Switching to new actionstate 'CalculateScoreActionState' "
		          
		          if thegame.GetCurrentPlayer.GetActionState.ToString = "CalculateScoreActionState" then
		            dbgmsg = dbgmsg + " successful"
		            unitTests.TestPassed dbgmsg
		          else
		            dbgmsg = dbgmsg + " failed"
		            unitTests.TestFailed dbgmsg
		          end if
		          
		        else
		          dbgmsg = "Slot occupation failed"
		          unitTests.TestPassed dbgmsg
		        end if
		        
		      else
		        dbgmsg = dbgmsg + "failed"
		        unitTests.TestFailed dbgmsg
		      end if
		      
		    else
		      dbgmsg = "Adding Tile failed - no further unit-tests in this test"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		  #endif
		  
		  
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub TestTownScore()
		  #if DebugBuild
		    dim dbgmsg as string
		    dim pd as PlayerData
		    dim uniqueId as string
		    dim sCon as Connections
		    dim tcon as connections
		    dim customTileArray() as Tile
		    
		    dim theGame as ConcreteGame
		    theGame = ConcreteGame.GetNewGameInstance
		    
		    pd.name = "Test1"
		    pd.type = 1
		    
		    theGame.AddPlayer pd
		    
		    pd.name = "Test2"
		    pd.type = 1
		    
		    theGame.AddPlayer pd
		    
		    //setting up the tiles
		    
		    uniqueId = "TownN"
		    sCon.north = false
		    sCon.east = false
		    sCon.south = false
		    sCon.west = false
		    tCon.north = false
		    tCon.east = false
		    tCon.south = false
		    tCon.west = false
		    dim townTileN as new Tile
		    townTileN.SetUid uniqueId
		    townTileN.id = 2
		    townTileN.SetNorthSection(new board.Town(townTileN))
		    townTileN.SetEastSection(new board.Grassland(townTileN))
		    townTileN.SetSouthSection(new board.Grassland(townTileN))
		    townTileN.SetWestSection(new board.Grassland(townTileN))
		    townTileN.grid.SetSlot("n", 3)
		    townTileN.grid.SetSlot("c", 1)
		    townTileN.northPicture = Town14a_100x100
		    townTileN.eastPicture = Town14d_100x100
		    townTileN.southPicture = Town14c_100x100
		    townTileN.westPicture = Town14b_100x100
		    townTileN.setStreetConnections sCon
		    townTileN.setTownConnections tCon
		    customTileArray.append townTileN
		    
		    uniqueId = "TownF"
		    sCon.north = true
		    sCon.east = false
		    sCon.south = false
		    sCon.west = true
		    tCon.north = true
		    tCon.east = false
		    tCon.south = false
		    tCon.west = true
		    dim townTileH as new Tile
		    townTileH.SetUid uniqueId
		    townTileH.id = 1
		    townTileH.SetNorthSection(new board.Town(townTileH))
		    townTileH.SetEastSection(new board.Street(townTileH))
		    townTileH.SetSouthSection(new board.Street(townTileH))
		    townTileH.SetWestSection(new board.Town(townTileH))
		    townTileH.grid.SetSlot("nw", 3)
		    townTileH.grid.SetSlot("se", 1)
		    townTileH.northPicture = Town08a_100x100
		    townTileH.eastPicture = Town08d_100x100
		    townTileH.southPicture = Town08c_100x100
		    townTileH.westPicture = Town08b_100x100
		    townTileH.setStreetConnections sCon
		    townTileH.setTownConnections tCon
		    customTileArray.append townTileH
		    
		    
		    dim customBag as new TileBag(customTileArray, false)
		    
		    if custombag.selfcheck = true then
		      dbgmsg = "RB-Array-Bug happended - restart unittests"
		      unitTests.TestFailed dbgmsg
		      exit sub
		    end if
		    
		    theGame.UseCustomTileBag custombag
		    
		    theGame.TestGo
		    
		    dim theTile as Tile
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.RotateClockwise
		    theTile.RotateClockwise
		    
		    dim xy() as Coordinates
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    dim i as integer
		    for i = 0 to ubound(xy)
		      if xy(i).x = 0 and xy(i).y = 1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    
		    'theGame.GetCurrentPlayer.
		    
		    //occupy the current Town on Gameboard
		    
		    dim possibleSlots() as board.slot
		    
		    possibleSlots = theGame.GetCurrentTile.grid.GetPossibleSlots
		    
		    
		    for i = 0 to ubound(possibleSlots)
		      if possibleSlots(i).GetType = "Town" then
		        theGame.GetCurrentPlayer.Occupy possibleSlots(i).GetPosition
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    dim before as integer
		    before = theGame.GetPlayerByName("test1").GetNumberOfGamepieces
		    
		    dbgmsg = "TestTownScore :: Testing the number of Gamepieces(should be 6 for player 'test1') "
		    
		    if before = 6 then
		      dbgmsg = dbgmsg + "passed - " + str(before)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed- " + str(before)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    //next player adds
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.RotateCounterClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = 1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    
		    'theGame.GetCurrentPlayer.
		    
		    //occupy the current Town on Gameboard
		    
		    possibleSlots = theGame.GetCurrentTile.grid.GetPossibleSlots
		    
		    
		    for i = 0 to ubound(possibleSlots)
		      if possibleSlots(i).GetType = "Town" then
		        theGame.GetCurrentPlayer.Occupy possibleSlots(i).GetPosition
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    
		    dbgmsg = "TestTownScore :: Testing the player 'test2' score (should be 6): "
		    
		    dim s as integer
		    
		    s = theGame.GetPlayerByName("test2").GetScore
		    
		    if s = 6 then
		      dbgmsg = dbgmsg + "passed (" + str(s) + ")"
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed (" + str(s) + ")"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		    
		    
		    
		    
		    
		    
		    dim after as integer = theGame.GetPlayerByName("test1").GetNumberOfGamepieces
		    
		    dbgmsg = "TestTownScore :: Testing the number of Gamepieces(should be 7 for player 'test1') "
		    
		    if after = 7 then
		      dbgmsg = dbgmsg + "passed - " + str(after)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed - " + str(after)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		  #endif
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub TestMonasteryScore()
		  #if DebugBuild
		    dim dbgmsg as string
		    dim pd as PlayerData
		    dim uniqueId as string
		    dim sCon as Connections
		    dim tcon as connections
		    dim customTileArray() as Tile
		    
		    
		    dim theGame as ConcreteGame
		    theGame = ConcreteGame.GetNewGameInstance
		    
		    pd.name = "Test1"
		    pd.type = 1
		    
		    theGame.AddPlayer pd
		    
		    pd.name = "Test2"
		    pd.type = 1
		    
		    theGame.AddPlayer pd
		    
		    
		    
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandB1")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandA4")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandB2")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandA2")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandA3")
		    customTileArray.Append thegame.GetBag.GetTileByUid("MonasteryA1")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandB3")
		    customTileArray.Append thegame.GetBag.GetTileByUid("VillageA1")
		    
		    
		    dim customBag as new TileBag(customTileArray, false)
		    
		    if custombag.selfcheck = true then
		      dbgmsg = "RB-Array-Bug happended - restart unittests"
		      unitTests.TestFailed dbgmsg
		      exit sub
		    end if
		    
		    
		    
		    theGame.UseCustomTileBag (customBag)
		    
		    dim theTile as Tile
		    dim xy() as Coordinates
		    
		    theGame.TestGo
		    
		    //test1
		    //village
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.RotateCounterClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    dim i as integer
		    for i = 0 to ubound(xy)
		      if xy(i).x = -1 and xy(i).y = 0 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    //test2
		    //grassland
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = 0 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    //test1
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 0 and xy(i).y = -1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    dim possibleSlots() as board.slot
		    possibleSlots = theGame.GetCurrentTile.grid.GetPossibleSlots
		    
		    for i = 0 to ubound(possibleSlots)
		      if possibleSlots(i).GetType = "Monastery" then
		        theGame.GetCurrentPlayer.Occupy possibleSlots(i).GetPosition
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = -1 and xy(i).y = -1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = -1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.RotateCounterClockwise
		    theTile.RotateCounterClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = -1 and xy(i).y = -2 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    
		    theTile.rotateClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 0 and xy(i).y = -2 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.rotateClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = -2 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    dim s as integer
		    
		    dbgmsg = "TestMonasteryScore :: Testing the player 'test2' score (should be 0): "
		    
		    
		    
		    s = theGame.GetPlayerByName("test2").GetScore
		    
		    if s = 0 then
		      dbgmsg = dbgmsg + "passed (" + str(s) + ")"
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed (" + str(s) + ")"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		    dbgmsg = "TestMonasteryScore :: Testing the player 'test1' score (should be 9): "
		    
		    
		    s = theGame.GetPlayerByName("test1").GetScore
		    
		    if s = 9 then
		      dbgmsg = dbgmsg + "passed (" + str(s) + ")"
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed (" + str(s) + ")"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		    
		    
		    
		    
		    dim after as integer = theGame.GetPlayerByName("test1").GetNumberOfGamepieces
		    
		    
		    dbgmsg = "TestMonasteryScore :: Testing the number of Gamepieces(should be 7 for player 'test1') "
		    
		    if after = 7 then
		      dbgmsg = dbgmsg + "passed - " + str(after)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed - " + str(after)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		  #endif
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub TestStreetScore()
		  #if DebugBuild
		    dim dbgmsg as string
		    dim pd as PlayerData
		    dim uniqueId as string
		    dim sCon as Connections
		    dim tcon as connections
		    dim customTileArray() as Tile
		    
		    
		    dim theGame as ConcreteGame
		    theGame = ConcreteGame.GetNewGameInstance
		    
		    pd.name = "Test1"
		    pd.type = 1
		    pd.aiType = -1
		    
		    theGame.AddPlayer pd
		    
		    pd.name = "Test2"
		    pd.type = 1
		    pd.aiType = -1
		    
		    
		    theGame.AddPlayer pd
		    
		    
		    
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandB1")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandA4")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandB2")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandA2")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandA3")
		    customTileArray.Append thegame.GetBag.GetTileByUid("MonasteryA1")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandB3")
		    customTileArray.Append thegame.GetBag.GetTileByUid("VillageA1")
		    
		    
		    dim customBag as new TileBag(customTileArray, false)
		    
		    if custombag.selfcheck = true then
		      dbgmsg = "RB-Array-Bug happended - restart unittests"
		      unitTests.TestFailed dbgmsg
		      exit sub
		    end if
		    
		    
		    theGame.UseCustomTileBag (customBag)
		    
		    theGame.TestGo
		    
		    
		    dim theTile as Tile
		    dim xy() as Coordinates
		    
		    
		    //test1
		    //village
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.RotateCounterClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    dim i as integer
		    for i = 0 to ubound(xy)
		      if xy(i).x = -1 and xy(i).y = 0 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    //test2
		    //grassland
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = 0 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    dim possibleSlots() as board.slot
		    possibleSlots = theGame.GetCurrentTile.grid.GetPossibleSlots
		    
		    for i = 0 to ubound(possibleSlots)
		      if possibleSlots(i).GetType = "Street" then
		        theGame.GetCurrentPlayer.Occupy possibleSlots(i).GetPosition
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    //test1
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 0 and xy(i).y = -1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = -1 and xy(i).y = -1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    
		    'dim possibleSlots() as board.slot
		    'possibleSlots = theGame.GetCurrentTile.grid.GetPossibleSlots
		    '
		    'for i = 0 to ubound(possibleSlots)
		    'if possibleSlots(i).GetType = "Street" then
		    'theGame.GetCurrentPlayer.Occupy possibleSlots(i).GetPosition
		    'end if
		    'next i
		    
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = -1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.RotateCounterClockwise
		    theTile.RotateCounterClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = -1 and xy(i).y = -2 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    
		    theTile.rotateClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 0 and xy(i).y = -2 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    'dim possibleSlots() as board.slot
		    'possibleSlots = theGame.GetCurrentTile.grid.GetPossibleSlots
		    '
		    'for i = 0 to ubound(possibleSlots)
		    'if possibleSlots(i).GetType = "Street" then
		    'theGame.GetCurrentPlayer.Occupy possibleSlots(i).GetPosition
		    'end if
		    'next i
		    '
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.rotateClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = -2 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    dim s as integer
		    
		    dbgmsg = "TestStreetScore :: Testing the player 'test2' score (should be 18): "
		    
		    
		    
		    s = theGame.GetPlayerByName("test2").GetScore
		    
		    if s = 18 then
		      dbgmsg = dbgmsg + "passed (" + str(s) + ")"
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed (" + str(s) + ")"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		    dbgmsg = "TestStreetScore :: Testing the player 'test1' score (should be 0): "
		    
		    
		    s = theGame.GetPlayerByName("test1").GetScore
		    
		    if s = 0 then
		      dbgmsg = dbgmsg + "passed (" + str(s) + ")"
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed (" + str(s) + ")"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		    dim after as integer = theGame.GetPlayerByName("test2").GetNumberOfGamepieces
		    
		    
		    dbgmsg = "TestStreetScore :: Testing the number of Gamepieces(should be 7 for player 'test2') "
		    
		    if after = 7 then
		      dbgmsg = dbgmsg + "passed - " + str(after)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed - " + str(after)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		  #endif
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub TestOccupyStreet()
		  #if DebugBuild
		    dim dbgmsg as string
		    dim pd as PlayerData
		    dim uniqueId as string
		    dim sCon as Connections
		    dim tcon as connections
		    dim customTileArray() as Tile
		    dim i as integer
		    
		    dim theGame as ConcreteGame
		    theGame = ConcreteGame.GetNewGameInstance
		    
		    pd.name = "Test1"
		    pd.type = 1
		    
		    theGame.AddPlayer pd
		    
		    pd.name = "Test2"
		    pd.type = 1
		    
		    theGame.AddPlayer pd
		    
		    
		    
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandB1")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandA4")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandB2")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandA2")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandA3")
		    customTileArray.Append thegame.GetBag.GetTileByUid("MonasteryA1")
		    customTileArray.Append thegame.GetBag.GetTileByUid("GrasslandB3")
		    customTileArray.Append thegame.GetBag.GetTileByUid("VillageA1")
		    
		    dim customBag as new TileBag(customTileArray, false)
		    
		    
		    if custombag.selfcheck = true then
		      dbgmsg = "RB-Array-Bug happended - restart unittests"
		      unitTests.TestFailed dbgmsg
		      exit sub
		    end if
		    
		    
		    theGame.UseCustomTileBag (customBag)
		    
		    theGame.TestGo
		    
		    dim theTile as Tile
		    dim xy() as Coordinates
		    
		    
		    
		    //test1
		    //village
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.RotateCounterClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    
		    
		    
		    dim occ as boolean
		    
		    for i = 0 to ubound(xy)
		      if xy(i).x = -1 and xy(i).y = 0 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    dbgmsg = "Check if Street (-1/0) is occupieable(should be true): "
		    
		    for i = 0 to ubound(xy)
		      occ = theGame.GetBoard.GetPositionIsOccupieableStreet(xy(i),theGame.GetcurrentPlayer )
		    next i
		    
		    if occ = true then
		      dbgmsg = dbgmsg + "passed " + str(occ)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed" + str(occ)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    //test2
		    //grassland
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    
		    
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = 0 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    
		    dbgmsg = "Check if Street (1/0) is still occupieable(should be true): "
		    
		    for i = 0 to ubound(xy)
		      occ = theGame.GetBoard.GetPositionIsOccupieableStreet(xy(i), theGame.GetCurrentPlayer)
		    next i
		    
		    
		    
		    if occ = true then
		      dbgmsg = dbgmsg + "passed " + str(occ)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed" + str(occ)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    dim possibleSlots() as board.slot
		    possibleSlots = theGame.GetCurrentTile.grid.GetPossibleSlots
		    
		    for i = 0 to ubound(possibleSlots)
		      if possibleSlots(i).GetType = "Street" then
		        theGame.GetCurrentPlayer.Occupy possibleSlots(i).GetPosition
		      end if
		    next i
		    
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    //test1
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    
		    for i = 0 to ubound(xy)
		      if xy(i).x = 0 and xy(i).y = -1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = -1 and xy(i).y = -1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    dbgmsg = "Check if Street (-1/-1) is occupieable(should be true): "
		    
		    for i = 0 to ubound(xy)
		      occ = theGame.GetBoard.GetPositionIsOccupieableStreet(xy(i), theGame.GetCurrentPlayer)
		    next i
		    
		    if occ = true then
		      dbgmsg = dbgmsg + "passed " + str(occ)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed" + str(occ)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    'dim possibleSlots() as board.slot
		    'possibleSlots = theGame.GetCurrentTile.grid.GetPossibleSlots
		    '
		    'for i = 0 to ubound(possibleSlots)
		    'if possibleSlots(i).GetType = "Street" then
		    'theGame.GetCurrentPlayer.Occupy possibleSlots(i).GetPosition
		    'end if
		    'next i
		    
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = -1 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    
		    
		    dbgmsg = "Check if Street (1/-1) is occupieable(should be false): "
		    
		    for i = 0 to ubound(xy)
		      occ = theGame.GetBoard.GetPositionIsOccupieableStreet(xy(i),theGame.GetCurrentPlayer)
		      if occ = false then exit for
		    next i
		    
		    if occ = false then
		      dbgmsg = dbgmsg + "passed " + str(occ)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed" + str(occ)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.RotateCounterClockwise
		    theTile.RotateCounterClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = -1 and xy(i).y = -2 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    dbgmsg = "Check if Street(-1/-2) is occupieable(should be true): "
		    
		    for i = 0 to ubound(xy)
		      occ = theGame.GetBoard.GetPositionIsOccupieableStreet(xy(i), theGame.GetCurrentPlayer)
		      if occ = true then exit for
		    next i
		    
		    if occ = true then
		      dbgmsg = dbgmsg + "passed " + str(occ)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed" + str(occ)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    
		    theTile.rotateClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 0 and xy(i).y = -2 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    'dim possibleSlots() as board.slot
		    'possibleSlots = theGame.GetCurrentTile.grid.GetPossibleSlots
		    '
		    'for i = 0 to ubound(possibleSlots)
		    'if possibleSlots(i).GetType = "Street" then
		    'theGame.GetCurrentPlayer.Occupy possibleSlots(i).GetPosition
		    'end if
		    'next i
		    
		    dbgmsg = "Check if Street(0/-2) is occupieable(should be true): "
		    
		    for i = 0 to ubound(xy)
		      occ = theGame.GetBoard.GetPositionIsOccupieableStreet(xy(i), theGame.GetCurrentPlayer)
		      if occ = true then exit for
		    next i
		    
		    if occ = true then
		      dbgmsg = dbgmsg + "passed " + str(occ)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed" + str(occ)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    
		    theTile = theGame.GetCurrentPlayer.GetNextTile
		    
		    theTile.rotateClockwise
		    
		    xy = theGame.GetPossibleCoordinatesForTile()
		    //place the tile
		    for i = 0 to ubound(xy)
		      if xy(i).x = 1 and xy(i).y = -2 then
		        call theGame.GetCurrentPlayer.AddTileAtPosition(theTile,xy(i))
		        exit for
		      end if
		    next i
		    
		    dbgmsg = "Check if Street(1/-2) is occupieable(should be false): "
		    
		    for i = 0 to ubound(xy)
		      occ = theGame.GetBoard.GetPositionIsOccupieableStreet(xy(i), theGame.GetCurrentPlayer)
		      if occ = false then exit for
		    next i
		    
		    if occ = false then
		      dbgmsg = dbgmsg + "passed " + str(occ)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed" + str(occ)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		    theGame.GetCurrentPlayer.EndRound
		    
		    //-----------------------------------------------------------------------------------
		    
		    dim s as integer
		    
		    dbgmsg = "TestStreetScore :: Testing the player 'test2' score (should be 18): "
		    
		    
		    
		    s = theGame.GetPlayerByName("test2").GetScore
		    
		    if s = 18 then
		      dbgmsg = dbgmsg + "passed (" + str(s) + ")"
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed (" + str(s) + ")"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		    dbgmsg = "TestStreetScore :: Testing the player 'test1' score (should be 0): "
		    
		    
		    s = theGame.GetPlayerByName("test1").GetScore
		    
		    if s = 0 then
		      dbgmsg = dbgmsg + "passed (" + str(s) + ")"
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + " failed (" + str(s) + ")"
		      unitTests.TestFailed dbgmsg
		    end if
		    
		    
		    dim after as integer = theGame.GetPlayerByName("test2").GetNumberOfGamepieces
		    
		    
		    dbgmsg = "TestStreetScore :: Testing the number of Gamepieces(should be 7 for player 'test2') "
		    
		    if after = 7 then
		      dbgmsg = dbgmsg + "passed - " + str(after)
		      unitTests.TestPassed dbgmsg
		    else
		      dbgmsg = dbgmsg + "failed - " + str(after)
		      unitTests.TestFailed dbgmsg
		    end if
		    
		  #endif
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub TestRandomAI()
		  dim pd as PlayerData
		  dim theGame as ConcreteGame
		  theGame = ConcreteGame.GetNewGameInstance
		  
		  pd.name = "Test1"
		  pd.type = 2
		  pd.aiType = 1
		  
		  theGame.AddPlayer pd
		  
		  pd.name = "Test2"
		  pd.type = 2
		  pd.aiType = 1
		  
		  theGame.AddPlayer pd
		  
		  theGame.Go
		  
		  unitTests.TestPassed app.Dbg
		  
		  'theGame.GetCurrentPlayer.Activate
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub RandomVsDecission()
		  dim pd as PlayerData
		  dim theGame as ConcreteGame
		  dim r as integer = 0
		  dim d as integer = 0
		  theGame = ConcreteGame.GetNewGameInstance
		  
		  pd.name = "Random"
		  pd.type = 2
		  pd.aiType = 1
		  
		  theGame.AddPlayer pd
		  
		  pd.name = "Decission"
		  pd.type = 2
		  pd.aiType = 2
		  
		  theGame.AddPlayer pd
		  
		  theGame.Go
		  
		  d = theGame.GetPlayerByName("Decission").GetScore
		  r = theGame.GetPlayerByName("Random").GetScore
		  
		  if d > app.highestD then
		    app.highestD = d
		  end if
		  if r > app.highestR then
		    app.highestR = r
		  end if
		  
		  if d > r then
		    app.decissionAI = app.decissionAI + 1
		  else
		    if d < r then
		      app.randomAI = app.randomAI + 1
		    else
		      app.tie = app.tie + 1
		    end if
		  end if
		  
		  'unitTests.TestPassed app.Dbg
		  app.Dbg = ""
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub DecissionVsDecission()
		  dim pd as PlayerData
		  dim theGame as ConcreteGame
		  dim r as integer = 0
		  dim d as integer = 0
		  theGame = ConcreteGame.GetNewGameInstance
		  
		  pd.name = "Decission1"
		  pd.type = 2
		  pd.aiType = 2
		  
		  theGame.AddPlayer pd
		  
		  pd.name = "Decission2"
		  pd.type = 2
		  pd.aiType = 2
		  
		  theGame.AddPlayer pd
		  
		  theGame.Go
		  
		  d = theGame.GetPlayerByName("Decission1").GetScore
		  r = theGame.GetPlayerByName("Decission2").GetScore
		  
		  if d > app.highestD then
		    app.highestD = d
		  end if
		  if r > app.highestR then
		    app.highestR = r
		  end if
		  
		  if d > r then
		    app.decissionAI = app.decissionAI + 1
		  else
		    if d < r then
		      app.randomAI = app.randomAI + 1
		    else
		      app.tie = app.tie + 1
		    end if
		  end if
		  
		  'unitTests.TestPassed app.Dbg
		  app.Dbg = ""
		End Sub
	#tag EndMethod

	#tag Method, Flags = &h1
		Protected Sub DecissionVs2Random()
		  dim pd as PlayerData
		  dim theGame as ConcreteGame
		  dim r as integer = 0
		  dim d as integer = 0
		  theGame = ConcreteGame.GetNewGameInstance
		  
		  pd.name = "Decission"
		  pd.type = 2
		  pd.aiType = 2
		  
		  theGame.AddPlayer pd
		  
		  pd.name = "Random1"
		  pd.type = 2
		  pd.aiType = 1
		  
		  theGame.AddPlayer pd
		  
		  pd.name = "Random2"
		  pd.type = 2
		  pd.aiType = 1
		  
		  theGame.AddPlayer pd
		  
		  
		  theGame.Go
		  
		  d = theGame.GetPlayerByName("Decission").GetScore
		  r = theGame.GetPlayerByName("Random1").GetScore
		  
		  if d > app.highestD then
		    app.highestD = d
		  end if
		  if r > app.highestR then
		    app.highestR = r
		  end if
		  
		  if d > r then
		    app.decissionAI = app.decissionAI + 1
		  else
		    if d < r then
		      app.randomAI = app.randomAI + 1
		    else
		      app.tie = app.tie + 1
		    end if
		  end if
		  
		  'unitTests.TestPassed app.Dbg
		  app.Dbg = ""
		End Sub
	#tag EndMethod


	#tag ViewBehavior
		#tag ViewProperty
			Name="Name"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Index"
			Visible=true
			Group="ID"
			InitialValue="-2147483648"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Super"
			Visible=true
			Group="ID"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Left"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
		#tag ViewProperty
			Name="Top"
			Visible=true
			Group="Position"
			InitialValue="0"
			InheritedFrom="Object"
		#tag EndViewProperty
	#tag EndViewBehavior
End Module
#tag EndModule
